import axios from 'axios';

export const changeDatabase = async (index_Id,newName) => {
    try {
        const response = await axios.post('http://localhost:65520/indices/rename',null,{
            params: { index_Id: index_Id,newName:newName }
        });

        return response;
    } catch (error) {
        return {
            status: 1001,
            msg: '数据库不存在'
        };
    }
}